function onAdvance(cid, skillid, prevskill, skill)
	local msgtype = MESSAGE_EVENT_ADVANCE
	
	if skillid >= SKILL_FIST and skillid <= SKILL_FISH then
		doPlayerSendTextMessage(cid, msgtype, "You advanced in " .. getSkillName(skillid) .. ".")
	elseif skillid == SKILL_LEVEL then
		doPlayerSendTextMessage(cid, msgtype, "You advanced from level " .. prevskill .. " to level " .. skill .. ".")
	else
		doPlayerSendTextMessage(cid, msgtype, "You advanced to magic level " .. skill .. ".")
	end
	
	return TRUE
	
end